﻿@model IEnumerable<Qu.SeniorProject.Model.ProjectPresentation>

@{
    ViewBag.Title = ViewBag.Message;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section head {

   <link href="@Url.Content("~/Content/GradesTable.css")" rel="stylesheet" type="text/css" />
   <script src="@Url.Content("~/Scripts/jquery.tablesorter.min.js")" type="text/javascript"></script>
   <script type="text/javascript">
       $(function () {
           $("#projectsTable").tablesorter({ widgets: ['zebra'] });
       });

   </script>
 }

@if (Request.IsAuthenticated && Session["UserInfo"] != null && ViewBag.Message != null)
{
    <h2>@ViewBag.Message</h2>
}

@if (ViewBag.NotFoundMessage != null)
{
    <h2>@ViewBag.NotFoundMessage</h2>
    return;
}

<table width="100%" id="projectsTable" class="tablesorter">
    <thead>
    <tr>
        <th>
            ID
        </th>
        <th>
            Title
        </th>
        <th style="width: 290px">
            Students
        </th>
        <th>
            Major
        </th>
        <th>
            Gender
        </th>
        <th style="width: 120px">
            Supervisor
        </th>
        <th style="width: 120px">
            Examiners
        </th>
        <th>
            Date
        </th>
        <th>
            Time
        </th>
        <th>
            Room
        </th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model)
{
    <tr>
        <td width="30px">
           @* @Html.ActionLink(item.ProjectID.ToString(), "ProjectDetails", new { id = item.ProjectID }) *@
           @Html.DisplayFor(modelItem => item.ProjectId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
             @Html.Raw(item.Students)
        </td>
        <td width="50px">
            @Html.DisplayFor(modelItem => item.Major)
        </td>
        <td width="55px">
            @Html.DisplayFor(modelItem => item.Gender)
        </td>
        <td>
             @Html.Raw(item.Supervisors)
        </td>
        <td>
            @Html.Raw(item.Examiners)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PresentationDate)
        </td>
        <td width="100px">
            @Html.DisplayFor(modelItem => item.PresentationTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Room)
        </td>
@*        <td width="50px">
             @Html.Raw(item.HtmlAction)
        </td>

        @if (ViewBag.CanAddProject != null && ViewBag.CanAddProject)
        {
             <td width="55px">
                @Html.ActionLink("Supervise Project", "EditProject", new { id = item.ProjectID, title = "Supervise this project (It is assumed that you have met and discussed the project with the students)", setSupervisor = true })
             </td>
        }*@
    </tr>
}

</tbody>
</table>

<br />
@*<div>
    @Html.ActionLink("Back to Home", "Index")
</div>*@